package com.zdp.user.controller;

import com.zdp.entity.base.R;
import com.zdp.entity.remote.UserVO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

@RestController
@RequestMapping("/user")
public class UserController {

    static List<UserVO> list = new ArrayList<>();

    static {
        for (int i = 0; i < 10; i++) {
            list.add(UserVO.builder().age(i).name(i + "name").build());
        }
    }

    @GetMapping("/list")
    public R<List<UserVO>> list() {
        return R.ok(list);
    }

}
